<?php 
session_start();
include ("accesBDD.php");

class edtmodele {

   private $email; 
   private $matiere ; //varb
   private $jour; //varc
   private $horaireDeb; //vard
   private $horaireFin; //vare
   private $groupeTd; //varf
   private $salle; //varg

//----------------------------------------------------------------------------------------------------------------------------//

	public function __construct ($matiere, $jour, $horaireDeb, $horaireFin, $groupeTD, $salle){
		$this->login_utilisateur=$_SESSION['email'];
		$this->nomMatiere = $matiere;
		$this->nomJour = $jour;
		$this->debut = $horaireDeb;
		$this->fin = $horaireFin;
		$this->nomGroupe = $groupeTD;
		$this->numSalle = $salle;
   }
   	
   public function save(){
      $req="INSERT INTO edt (nomMatiere, nomJour, debut, fin, nomGroupe, numSalle) VALUES ('$this->nomMatiere','$this->nomJour','$this->debut','$this->fin','$this->nomGroupe','$this->numSalle')";
      mysql_query($req) or die ("erreur insertion");
   }
   
 /* public function recup(){
   
  $varb = "SELECT nomMatiere FROM edt WHERE nomMatiere='$this->nomMatiere'"
  return mysql_fetch_array(mysql_query($varb));
   
   }*/
}	
		
?>

